package com.iraeta.controller;

import com.alibaba.fastjson.JSONObject;
import com.iraeta.entity.IraOrderWuLiuStep;
import com.iraeta.service.iraorder.IraOrderWuLiuStepService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/*
 * 订单的物流步骤维护功能  这个功能作废 直接用IraOrderWuLiuStepSpeed
 * */
@RestController(value = "IraOrderWuLiuStepController")
@RequestMapping("emp/orderwuliustep")
public class IraOrderWuLiuStepController extends BaseController{
    @Resource
    IraOrderWuLiuStepService iraOrderWuLiuStepService;

    @RequestMapping("listorderstep")
    public String listOrdrStep(@RequestBody JSONObject paramJb){
        int orderId = paramJb.getIntValue("id");
        List<IraOrderWuLiuStep> stepList = iraOrderWuLiuStepService.listIraOrderWuLiuStep(orderId);
        return this.success(stepList);
    }

    @RequestMapping("deleteorderstop")
    public String deleteOrdrStep(@RequestBody JSONObject paramJb){
        int id = paramJb.getIntValue("id");
        this.iraOrderWuLiuStepService.deleteIraOrderWuLiuStep(id);
        return this.success();
    }
}
